-- GENERATED SPELL FOR [Shadowpine Shadowcaster] --


function spell0_16469(pUnit, Event) --@Mark of Shadow,n/a--
pUnit:FullCastSpellOnTarget(31394,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_16469', 3500, 1)
end

function spell1_16469(pUnit, Event) --@Mind Flay,n/a--
pUnit:FullCastSpellOnTarget(16568,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_16469', 3000, 1)
end

function Sorts_16469(pUnit, Event)
local choix_sorts_16469 = math.random(0, 1)
if choix_sorts_16469 == 0 then
pUnit:RegisterEvent('spell0_16469', 1, 1)
end
if choix_sorts_16469 == 1 then
pUnit:RegisterEvent('spell1_16469', 1, 1)
end
end

function mob16469_Action(pUnit, Event)
pUnit:RegisterEvent('Sorts_16469', math.random(1500, 3000), 1)
end

function mob16469_Leave(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob16469_Kill(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob16469_Die(pUnit, Event)
pUnit:RemoveEvents();
end

RegisterUnitEvent(16469, 1, 'mob16469_Action')
RegisterUnitEvent(16469, 2, 'mob16469_Leave')
RegisterUnitEvent(16469, 3, 'mob16469_Kill')
RegisterUnitEvent(16469, 4, 'mob16469_Die')
